<!-- resources/views/welcome.blade.php -->
@extends('layouts.app')

@push('styles')
    <link rel="stylesheet" href="{{ asset('web/css/welcome.css') }}">
@endpush

@section('content')
    @if (isset($contents['introduce']))
        <div class="introduce overview">
            <div class="introduce-title">
                <div class="divider-column"></div>
                <div class="title-text">
                    <div class="cn">{{$contents['introduce']['title'] }}</div>
                </div>
                <div class="divider-column"></div>
            </div>
            <div class="overview-content">
                <div class="overview-item">
                    <div class="item-title">{{ $contents['introduce']['items'][0]->title }}</div>
                    <div class="item-content">
                        <img src="{{ $contents['introduce']['items'][0]->images[0] }}" width="540" height="330">
                        <div class="item-content-text">{!! $contents['introduce']['items'][0]->content !!}</div>
                    </div>
                </div>
            </div>
        </div>
    @endif
    @if (isset($contents['environment']))
        <div class="introduce">
            <div class="introduce-title">
                <div class="divider-column"></div>
                <div class="title-text">
                    <div class="cn">园区环境</div>
                    <div class="en">Park environment</div>
                </div>
                <div class="divider-column"></div>
            </div>
            <div class="environment">
                <div class="line">
                    @foreach(array_slice($contents['environment']['items'][0]->images, 0, 3) as $v)
                        <img src="{{ $v }}" width="365" height="244">
                    @endforeach
                </div>
                <div class="line">
                    @foreach(array_slice($contents['environment']['items'][0]->images, -2) as $v)
                        <img src="{{ $v }}" width="552" height="409">
                    @endforeach
                </div>
            </div>
        </div>
    @endif
@endsection